<?php
//$_POST['name']
//$_POST['pwd']
//$_POST['url']登录时的地址

	include 'include/function.php';
	
	if(!isset($_POST['name']))redirect('./');
	
	$ret=do_login(get_to_mysql($_POST['name']),get_to_mysql($_POST['pwd']),$site_perfix,$_POST['remember']);
	
	if($ret)redirect('error.php?msg=' . urlencode($ret));
	
	redirect(stripslashes($_POST['url']));
?>
